# encoding=utf-8
from sqlalchemy_serializer import SerializerMixin

from app import dBSession
from app.Models.BaseModel import BaseModel
from app.Models.Model import PlayersModel, TeamsModel
from app.Vendor.Utils import Utils


class Team(TeamsModel, BaseModel, SerializerMixin):

    @staticmethod
    def getTeamList():
        teams = dBSession.query(Team).all()
        return Utils.db_l_to_d(teams)


